Skip to content

Add CNN-LSTM model for ICU Mortality Prediction#943

Open
nikhita2 wants to merge 9 commits intosunlabuiuc:masterfrom
nikhita2:nikhita2/add-cnn-lstm-model
Open

Add CNN-LSTM model for ICU Mortality Prediction#943
nikhita2 wants to merge 9 commits intosunlabuiuc:masterfrom
nikhita2:nikhita2/add-cnn-lstm-model

Conversation

@nikhita2
Copy link
Copy Markdown

@nikhita2 nikhita2 commented Apr 5, 2026

Contributor: Nikhita Shanker (nikhita2@illinois.edu)

Contribution Type: Model

Original Paper: "Robust Mortality Prediction in the Intensive Care Unit using Temporal Difference Learning" (Frost et al.)
Link to the Original Paper: https://arxiv.org/pdf/2411.04285

Description: This PR adds the CNNLSTMPredictor model to PyHealth, implementing the CNN-LSTM model from the paper. The model processes medical codes through:

  1. Embedding layer - Maps discrete medical codes to dense vectors
  2. CNN encoder - Uses (Conv1d -> BatchNorm -> ReLU -> MaxPool) for capturing local patterns
  3. LSTM encoder - For sequential dependency modeling
  4. Dense decoder - Uses (BatchNorm -> Linear -> ReLU -> Dropout -> BatchNorm -> Linear) and produces the final prediction
  • The model inherits from pyhealth.models.BaseModel, and implements the forward() method

Replication Aspect of the Paper: This PR directly implements the CNN-LSTM model from the replicated paper (Frost et al.).

  • The architecture in cnn_lstm.py uses the original paper's CNN-LSTM design
  • The ablation/extension extends the paper through hyperparameter variation (learning rate, hidden dimension, dropout, batch size), whereas the original paper uses fixed default values for these hyperparameters.

Files to Review:

  • pyhealth/models/cnn_lstm.py: Model implementation (CNNLSTMPredictor)
  • pyhealth/models/init.py: Adds CNNLSTMPredictor to imports
  • tests/core/test_cnn_lstm.py: Unit tests with synthetic data
  • examples/mimic4_icu_mortality_cnn_lstm.py: Ablation/extension script with learning rate, hidden dim, dropout, and batch size sweeps
  • docs/api/models/pyhealth.models.cnn_lstm.rst: API documentation RST file
  • docs/api/models.rst: Updated to add cnn_lstm

@nikhita2 nikhita2 marked this pull request as ready for review April 19, 2026 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant